<template>
  <div class="prize">
    <!-- 头部 -->
    <NavigationBar title="我的奖品"></NavigationBar>
    <div v-if="prizeList.length>0">prizeList</div>
    <div class="kong" v-else>暂无奖品</div>
  </div>
</template>

<script>
export default {
  name: "Prize",
  data() {
    return {
      prizeList: []
    }
  },
// 侦听器
  watch: {},
// 计算属性
  computed: {},
// 事件
  methods: {},
// 生命周期
  created() {
  },
  mounted() {
    this.$ajax.prizeList().then(res => {
      if (res.error_code !== 0) {
        this.$toast(res.error_desc)
      } else {
        this.prizeList = res.data.drawList
      }
      // console.log(res)
    })
  }
}
</script>

<style lang="scss" scoped>
.prize {
  width: 100%;

  .kong {
    font-weight: normal;
    font-size: 18px;
    margin-top: 65px;
    text-align: center;
  }
}
</style>